try:
    num = int(input('请输入数字:'))
    result = 1 / num
    print(result)
except (ZeroDivisionError,ValueError) as e:
 print(e)